package com.honglang.module.album.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.honglang.common.tools.Pager;
import com.honglang.module.album.entity.Photo;

public interface PhotoService {
	
	/**
	 * save photo entities to db
	 * @param realContextPath  the context path of the project;
	 * @param fileNameList
	 */
	@Transactional(readOnly = false)
	public void addPhoto(String realContextPath,List<String> fileNameList);
	
	
	/**
	 *  get one page of photos
	 * @param pageSize
	 * @param pageNo
	 * @return
	 */
	@Transactional(readOnly = true)
	public Pager getPager(int pageSize,int pageNo);
	
	

	/**
	 * get Photo Entity by id
	 * @param id
	 * @return
	 */
	@Transactional(readOnly = true)
	public Photo getPhoto(Integer id);
	
	/**
	 * delete photo
	 * @param photo
	 */
	public void delete(Photo photo);
}
